CC = g++

STD = -std=c++11

CFLAGS = -g -Wall

SRC = $(wildcard *.cpp)

OBJ = $(patsubst %c, %o, $(SRC))

BIN = main

all:$(OBJ)
	$(CC) $(OBJ) -o $(BIN)

%.o:%.cpp
	$(CC) $(STD) $(CFLAGS) -c $< -o $@

clean:
	rm $(BIN)
